Unit 2 Exercise 11
Exercise 11: Looping Jobs
Objective
Utilize the Restart settings to create a Looping Job.
Summary
Utilizing the schedule, My First Schedule, you will add a looping job that will restart multiple times after each run Finishes OK.
Instructions
Create a Looping Job
- In Studio, select the My First Schedule
- Click the View button.
- In the side menu, select Add Job.
- Validate that My First Schedule is in the Schedule field.
- In the Name textbox, enter
Looping Job
. - In the Job Type drop-down, select Windows.
- Expand the Task Details section to open the Details box.
- In the Machine Selection section, select the SMATraining machine from the Machines or Machine Group drop down.
- In the General section, select SMATRAINING\SMAUSER from the User Id drop down.
- Under the Run section, type the following in the Command Line box:.
"C:\Program Files\OpConxps\MSLSAM\genericp.exe" -t10
- Click the Save button.
- Click the Lock button to enter Admin Mode.
- Expand the Frequency section, if not already expanded.
- Select the Example-Mon-Sun-0 frequency in the Inactive column.
- Using the < move the frequency into the Active column.
- In the Active column, select the frequency you just added.
- Scroll down to the When Job Finishes Ok section
- In the Run Again drop-down, select Restart Offset.
- In the Run Interval drop down, select Minutes from Start to Start.
- In the Value field, enter
15
. - In the Number of Runs field, enter
4
.
- Click Save.
- Close Studio.
Add the Job to the Daily
- In Operations, click on Processes in the top right corner.
- In the Date section, select today's date.
- In the Schedule section, right-click on My First Schedule.
- In the Schedule Selection window, click the + sign.
- In the Add Job(s) for... pop-up window, select the Looping Job and click Next.
- On the next screen, click the Release radial button then click Next.
- On the next screen, click Submit.
- Click Close.
- In the Job section, you should see the job and it should run successfully.
info
The Looping Job will probably look like it is stuck in the "Wait Start Time" state but if you look at the Return Code column, you should see all zeros (0000000000).
- Close Operations.
Enterprise Manager
Details
- Multiple Frequencies
- Create a new Schedule.
- Add a Null Job and setup Frequencies allowing a Job to run on the 15th of the month (working day before) and the last business day of the month.
- Schedule - 5 Day Work Week
- The Job runs at
20:00
when it is not the last day of the month and18:00
when it is the last business day of the month.
- Use the Forecast All Button to view both Frequencies.
- The first listed will be Green and the second will be Yellow.
- Negative Frequencies
In a new Null Job (same Schedule), set up Frequencies allowing the Job to run every day of the month, Monday through Friday, unless it is a Holiday or the last Day of the Month.
Use the Forecast All Button to view both Frequencies.
noteThe Negative Frequency will appear purple